﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;
using Watchdog.Facade;

namespace Watchdog.IFacade {

    [ServiceContract ( SessionMode = SessionMode.Required )]
    public partial interface IWatchdogDataService {
        #region [ Stored Procs for 'AssemblyFile' ]
        //Delete
        [OperationContract ()]
        void AssemblyFileDelete ( AssemblyFile assemblyfile );

        //Find
        //Get_List
        //GetByDefinition
        [OperationContract ()]
        List<AssemblyFile> AssemblyFileGetByDefinition ( int definition );
        //GetById
        [OperationContract ()]
        AssemblyFile AssemblyFileGetById ( int id );

        //GetPaged
        //Insert
        [OperationContract ()]
        AssemblyFile AssemblyFileInsert ( AssemblyFile assemblyfile );

        //Update
        [OperationContract ()]
        bool AssemblyFileUpdate ( AssemblyFile assemblyfile );

        #endregion

        #region [ Stored Procs for 'Config' ]
        //Delete
        [OperationContract ()]
        void ConfigDelete ( Config config );

        //Find
        //Get_List
        //GetByDefinition
        [OperationContract ()]
        List<Config> ConfigGetByDefinition ( int definition );
        //GetById
        [OperationContract ()]
        Config ConfigGetById ( int id );

        //GetPaged
        //Insert
        [OperationContract ()]
        Config ConfigInsert ( Config config );

        //Update
        [OperationContract ()]
        bool ConfigUpdate ( Config config );

        #endregion

        #region [ Stored Procs for 'ConfigValue' ]
        //Delete
        [OperationContract ()]
        void ConfigValueDelete ( ConfigValue configvalue );

        //Find
        //Get_List
        //GetByConfig
        [OperationContract ()]
        List<ConfigValue> ConfigValueGetByConfig ( int config );
        //GetById
        [OperationContract ()]
        ConfigValue ConfigValueGetById ( int id );

        //GetByTest
        [OperationContract ()]
        List<ConfigValue> ConfigValueGetByTest ( int test );
        //GetPaged
        //Insert
        [OperationContract ()]
        ConfigValue ConfigValueInsert ( ConfigValue configvalue );

        //Update
        [OperationContract ()]
        bool ConfigValueUpdate ( ConfigValue configvalue );

        #endregion

        #region [ Stored Procs for 'Definition' ]
        //AddTargetType
        [OperationContract ()]
        void DefinitionAddTargetType ( Definition definition, TargetType targettype );
        //Delete
        [OperationContract ()]
        void DefinitionDelete ( Definition definition );

        //Find
        //Get_List
        //GetById
        [OperationContract ()]
        Definition DefinitionGetById ( int id );

        //GetByTargetType
        [OperationContract ()]
        List<Definition> DefinitionGetByTargetType ( int targettype );
        //GetPaged
        //Insert
        [OperationContract ()]
        Definition DefinitionInsert ( Definition definition );

        //RemoveTargetType
        [OperationContract ()]
        void DefinitionRemoveTargetType ( Definition definition, TargetType targettype );
        //Update
        [OperationContract ()]
        bool DefinitionUpdate ( Definition definition );

        #endregion

        #region [ Stored Procs for 'Notification' ]
        //AddTest
        [OperationContract ()]
        void NotificationAddTest ( Notification notification, Test test );
        //Delete
        [OperationContract ()]
        void NotificationDelete ( Notification notification );

        //Find
        //Get_List
        //GetById
        [OperationContract ()]
        Notification NotificationGetById ( int id );

        //GetByTest
        [OperationContract ()]
        List<Notification> NotificationGetByTest ( int test );
        //GetPaged
        //Insert
        [OperationContract ()]
        Notification NotificationInsert ( Notification notification );

        //RemoveTest
        [OperationContract ()]
        void NotificationRemoveTest ( Notification notification, Test test );
        //Update
        [OperationContract ()]
        bool NotificationUpdate ( Notification notification );

        #endregion

        #region [ Stored Procs for 'Schedule' ]
        //Delete
        [OperationContract ()]
        void ScheduleDelete ( Schedule schedule );

        //Find
        //Get_List
        //GetById
        [OperationContract ()]
        Schedule ScheduleGetById ( int id );

        //GetByTest
        [OperationContract ()]
        List<Schedule> ScheduleGetByTest ( int test );
        //GetPaged
        //Insert
        [OperationContract ()]
        Schedule ScheduleInsert ( Schedule schedule );

        //Update
        [OperationContract ()]
        bool ScheduleUpdate ( Schedule schedule );

        [OperationContract ()]
        List<Schedule> ScheduleGetPending ();

        [OperationContract ()]
        List<Schedule> ScheduleGetLocked ();
        #endregion

        #region [ Stored Procs for 'TargetDevice' ]
        //Delete
        [OperationContract ()]
        void TargetDeviceDelete ( TargetDevice targetdevice );

        [OperationContract ()]
        void TargetDeviceAddDevice ( int device, int test );
        [OperationContract ()]
        void TargetDeviceRemoveDevice ( int device, int test );
        //Find
        //Get_List
        //GetByTest
        [OperationContract ()]
        List<TargetDevice> TargetDeviceGetByTest ( int test );
        //GetByTestDevice
        [OperationContract ()]
        List<TargetDevice> TargetDeviceGetByTestDevice ( int testdevice );
        //GetPaged
        //Insert
        [OperationContract ()]
        TargetDevice TargetDeviceInsert ( TargetDevice targetdevice );

        //Update
        [OperationContract ()]
        bool TargetDeviceUpdate ( TargetDevice targetdevice );

        #endregion

        #region [ Stored Procs for 'TargetType' ]
        //AddDefinition
        [OperationContract ()]
        void TargetTypeAddDefinition ( TargetType targettype, Definition definition );
        //Delete
        [OperationContract ()]
        void TargetTypeDelete ( TargetType targettype );

        //Find
        //Get_List
        //GetByDefinition
        [OperationContract ()]
        List<TargetType> TargetTypeGetByDefinition ( int definition );
        //GetById
        [OperationContract ()]
        TargetType TargetTypeGetById ( int id );

        //GetPaged
        //Insert
        [OperationContract ()]
        TargetType TargetTypeInsert ( TargetType targettype );

        //RemoveDefinition
        [OperationContract ()]
        void TargetTypeRemoveDefinition ( TargetType targettype, Definition definition );
        //Update
        [OperationContract ()]
        bool TargetTypeUpdate ( TargetType targettype );

        #endregion

        #region [ Stored Procs for 'Test' ]
        //AddNotification
        [OperationContract ()]
        void TestAddNotification ( Test test, Notification notification );
        //Delete
        [OperationContract ()]
        void TestDelete ( Test test );

        //Find
        //Get_List
        [OperationContract ()]
        List<Test> TestGetAll ();
        //GetByDefinition
        [OperationContract ()]
        List<Test> TestGetByDefinition ( int definition );
        //GetById
        [OperationContract ()]
        Test TestGetById ( int id );

        //GetByNotification
        [OperationContract ()]
        List<Test> TestGetByNotification ( int notification );
        //GetPaged
        //Insert
        [OperationContract ()]
        Test TestInsert ( Test test );

        //RemoveNotification
        [OperationContract ()]
        void TestRemoveNotification ( Test test, Notification notification );
        //Update
        [OperationContract ()]
        bool TestUpdate ( Test test );

        #endregion

        #region [ Stored Procs for 'TestHistory' ]
        //Delete
        [OperationContract ()]
        void TestHistoryDelete ( TestHistory testhistory );

        //Find
        //Get_List
        //GetById
        [OperationContract ()]
        TestHistory TestHistoryGetById ( int id );

        //GetByTest
        [OperationContract ()]
        List<TestHistory> TestHistoryGetByTest ( int test );
        //GetPaged
        //Insert
        [OperationContract ()]
        TestHistory TestHistoryInsert ( TestHistory testhistory );

        //Update
        [OperationContract ()]
        bool TestHistoryUpdate ( TestHistory testhistory );

        #endregion

        #region [ Stored Procs for 'TestStatus' ]
        //Delete
        [OperationContract ()]
        void TestStatusDelete ( TestStatus teststatus );

        //Find
        //Get_List
        //GetByTest
        [OperationContract ()]
        List<TestStatus> TestStatusGetByTest ( int test );
        //GetPaged
        //Insert
        [OperationContract ()]
        TestStatus TestStatusInsert ( TestStatus teststatus );

        //Update
        [OperationContract ()]
        bool TestStatusUpdate ( TestStatus teststatus );

        #endregion

        #region [ Stored Procs for 'TestTargetStatus' ]
        //Delete
        [OperationContract ()]
        void TestTargetStatusDelete ( TestTargetStatus testtargetstatus );

        //Find
        //Get_List
        //GetByTest
        [OperationContract ()]
        List<TestTargetStatus> TestTargetStatusGetByTest ( int test );
        //GetByTestTarget
        [OperationContract ()]
        List<TestTargetStatus> TestTargetStatusGetByTestTarget ( int testtarget );
        //GetPaged
        //Insert
        [OperationContract ()]
        TestTargetStatus TestTargetStatusInsert ( TestTargetStatus testtargetstatus );

        //Update
        [OperationContract ()]
        bool TestTargetStatusUpdate ( TestTargetStatus testtargetstatus );

        #endregion

        #region [ Stored Procs for 'TestUnit' ]
        //Delete
        [OperationContract ()]
        void TestUnitDelete ( TestUnit testunit );

        //Find
        //Get_List
        //GetById
        [OperationContract ()]
        TestUnit TestUnitGetById ( int id );

        //GetPaged
        //Insert
        [OperationContract ()]
        TestUnit TestUnitInsert ( TestUnit testunit );

        //Update
        [OperationContract ()]
        bool TestUnitUpdate ( TestUnit testunit );

        [OperationContract ()]
        List<TestUnit> TestUnitGetAll ();

        #endregion

        #region [ Stored Procs for 'Zone' ]
        //Delete
        [OperationContract ()]
        void ZoneDelete ( Zone zone );

        //GetById
        [OperationContract ()]
        Zone ZoneGetById ( int id );

        //Insert
        [OperationContract ()]
        Zone ZoneInsert ( Zone zone );

        //Update
        [OperationContract ()]
        bool ZoneUpdate ( Zone zone );

        #endregion
    }
}

